package com.example.demo.mapper;


import com.example.demo.model.Klass;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface KlassMapper {

    List<Klass> findAll(Klass klass);

    @Delete("delete from klass where id =#{id}")
    void deleteById(String id);

    @Insert("insert into klass(id,name,major) values(#{id},#{name},#{major})")
    void save(Klass s);
    @Update("update klass set name = #{name},major=#{major} where id=#{id}")
    void update(Klass s);
    @Select("select * from klass where id=#{id}")
    Klass getReferenceById(String id);

}
